<!DOCTYPE html>
<html>
<head>
    <title>首页 {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>

    <link href="__TMPL__/public/assets/simpleboot3/themes/simpleboot3/bootstrap.min.css" rel="stylesheet">
    <link href="__TMPL__/public/assets/css/tube.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/js/layui/css/layui.css" media="all">
    <link href="__TMPL__/public/assets/css/user-center.css" rel="stylesheet">

    <hook name="before_head_end"/>
    <style>
        label{
            display: block;
        }
        .form-horizontal .form-group{
            margin-right: 0;
            margin-left: 0;
        }
        .uploader{
            position:relative;
            overflow:hidden;
            cursor:default;
            padding:0;
            display: inline-block;
        }
        .filename{
            float:left;
            display:inline-block;
            outline:0 none;
            height:32px;
            width:180px;
            margin:0;
            padding:8px 10px;
            overflow:hidden;
            cursor:default;
            border:1px solid;
            border-right:0;
            font:9pt/100% Arial, Helvetica, sans-serif; color:#777;
            text-shadow:1px 1px 0px #fff;
            text-overflow:ellipsis;
            white-space:nowrap;

            -moz-border-radius:5px 0px 0px 5px;
            -webkit-border-radius:5px 0px 0px 5px;
            border-radius:5px 0px 0px 5px;

            background:#f5f5f5;
            background:-moz-linear-gradient(top, #fafafa 0%, #eee 100%);
            background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#fafafa), color-stop(100%,#f5f5f5));
            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#f5f5f5',GradientType=0);
            border-color:#ccc;

            -moz-box-shadow:0px 0px 1px #fff inset;
            -webkit-box-shadow:0px 0px 1px #fff inset;
            box-shadow:0px 0px 1px #fff inset;

            -moz-box-sizing:border-box;
            -webkit-box-sizing:border-box;
            box-sizing:border-box;
        }

        .button{
            float:left;
            height:32px;
            display:inline-block;
            outline:0 none;
            padding:8px 12px;
            margin:0;
            cursor:pointer;
            border:1px solid;
            font:bold 9pt/100% Arial, Helvetica, sans-serif;

            -moz-border-radius:0px 5px 5px 0px;
            -webkit-border-radius:0px 5px 5px 0px;
            border-radius:0px 5px 5px 0px;

            -moz-box-shadow:0px 0px 1px #fff inset;
            -webkit-box-shadow:0px 0px 1px #fff inset;
            box-shadow:0px 0px 1px #fff inset;
        }


        .uploader input[type=file]{
            position:absolute;
            top:0; right:0; bottom:0;
            border:0;
            padding:0; margin:0;
            height:30px;
            cursor:pointer;
            filter:alpha(opacity=0);
            -moz-opacity:0;
            -khtml-opacity: 0;
            opacity:0;
        }

        input[type=button]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;}
        input[type=text]::-moz-focus-inner{padding:0; border:0 none; -moz-box-sizing:content-box;}
    </style>
</head>
<body class="body-white">
    <div class="templatemo-content">
        <!--  我的应用左侧 -->
        <include file="public@tube"/>
        <!--  我的应用左侧 -->

        <!--  内容中心 -->
        <div class="templatemo-body">
            <div class="templatemo-body-title">
                添加证书
            </div>
            <div class="templatemo-body-table">
                <form class="form-horizontal" action="{:url('/user/certificate/save_certificate')}" method="post" enctype="multipart/form-data">
                    <input type="hidden" value="{$certificate.id|default=''}">
                    <div class="form-group">
                        <label>备注信息</label>
                        <input type="text" class="form-control" name="mark" id="mark" placeholder="请输入Team ID" value="{$certificate.mark|default=''}">
                    </div>
                    <div class="form-group">
                        <label>Team ID</label>
                        <input type="text" class="form-control" name="team_id" id="team_id" placeholder="请输入Team ID" value="{$certificate.team_id|default=''}">
                    </div>
                    <div class="form-group">
                        <label>Iss</label>
                        <input type="text" class="form-control" name="iss" id="iss" placeholder="请输入Iss" value="{$certificate.iss|default=''}">
                    </div>
                    <div class="form-group">
                        <label>Kid</label>
                        <input type="text" class="form-control" name="kid" id="kid" placeholder="请输入Kid" value="{$certificate.kid|default=''}">
                    </div>
                    <div class="form-group">
                        <label>Tid</label>
                        <input type="text" class="form-control" name="tid" id="tid" placeholder="请输入与Tid" value="{$certificate.tid|default=''}">
                    </div>
                    <div class="form-group">
                        <label>P12 密码</label>
                        <input type="text" class="form-control" name="p12_pwd" id="p12_pwd" placeholder="请输入P12密码">
                    </div>

                    <div class="form-group">
                        <label>P12文件上传</label>
                        <div class="uploader white">
                            <input type="text" class="filename" readonly/>
                            <input type="button" name="file" class="button" value="选择P12文件" />
                            <input type="file" size="30" id="p12_file" name="p12_file" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label>P8文件上传</label>
                        <div class="uploader white">
                            <input type="text" class="filename" readonly/>
                            <input type="button" name="file" class="button" value="选择P8文件" />
                            <input type="file" size="30" id="p8_file" name="p8_file" />
                        </div>
                    </div>
                    <button type="submit" class="btn_add_certificate">保存</button>
                </form>
            </div>
        </div>
        <!--  内容中心 -->
    </div>

    <script src="__TMPL__/public/assets/js/slippry.min.js"></script>
    <script src="/static/js/layer/layer.js"></script>
    <script>
        $(function(){
            $("input[type=file]").change(function(){$(this).parents(".uploader").find(".filename").val($(this).val());});
            $("input[type=file]").each(function(){
                if($(this).val()==""){$(this).parents(".uploader").find(".filename").val("你还未选择文件");}
            });
        });
    </script>
    <hook name="before_body_end"/>
</div>
</body>
</html>
